package com.hermes.biz.dao.comment.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.hermes.biz.common.model.comment.FbckDO;
import com.hermes.biz.dao.comment.FbckDAO;

public class FbckDAOImpl extends SqlMapClientDaoSupport implements FbckDAO{

	@SuppressWarnings("unchecked")
	public List<FbckDO> getAllComment() {
		try {
			return this.getSqlMapClientTemplate().getSqlMapClient().queryForList("Fbck.getAllComments");
		} catch (SQLException e) {
			
		}
		return null;
	}

	public Object saveComment(FbckDO cmt) {
		try {
			return   this.getSqlMapClientTemplate().getSqlMapClient().insert("Fbck.InsertComment",cmt);
		} catch (SQLException e) {
			System.out.println(e.toString());
		}
		return -1;
	}

}
